# include <bits/stdc++.h>
# define MAXN 100023
# define MAXM 7000023
using namespace std;

typedef long long ll;
        
char buf[1 << 18], *fs, *ft;
char ops[1 << 18], *opt = ops, *const opt_end = ops + (1 << 18);
 
inline char getc() { 
    return (fs == ft && (ft = (fs = buf) + fread(buf, 1, 1 << 18, stdin)), fs == ft) ? EOF : *fs++;
}
 
inline int gn() { 
    int k = 0, f = 1;
    char c = getc();
    for(; !isdigit(c); c = getc()) if(c == '-') f = -1;
    for(; isdigit(c); c = getc()) k = k * 10 + c - '0';
    return k * f;
}
 
inline void out() { 
    fwrite(ops, 1, opt - ops, stdout);
    opt = ops;
}
 
inline void out(int x, char c) { 
    bool f = 0;
    if(x < 0) { 
        x = -x;
        f = 1;
    }
    static char *p = new char[21]();
    *(++p) = c;
    do { 
        *(++p) = x % 10 | 0x30;
        x /= 10;
    } while(x);
    if(f) *(++p) = '-';
    while(*p) { 
        *(opt++) = *(p--);
        if(opt == opt_end) out();
    }
}

int n, m, q, u, v, t;
int a[MAXN];
int s[3][MAXM], l[3], r[3];

inline int GetMax() {
    static int now, id;
    now = INT_MIN, id = 0;
    for (int i = 0; i < 3; i++) {
        if(r[i] - l[i] && s[i][l[i]] > now)
            now = s[id = i][l[i]];
    }
    return id;
}

int main() { 
#ifndef LOCAL
    freopen("earthworm.in", "r", stdin);
    freopen("earthworm.out", "w", stdout);
#endif
    n = gn(), m = gn(), q = gn(), u = gn(), v = gn(), t = gn();
    for(int i = 0; i < n; i++) a[i] = gn();
    sort(a, a + n);
    reverse(a, a + n);
    memcpy(s[0], a, sizeof a);
    memset(l, 0, sizeof l);
    memset(r, 0, sizeof r);
    r[0] = n;

    bool flag = 0;
    for (int ti = 0, now, id, le, ri, tmp; ti < m; ti++) {
        id = GetMax();
        now = s[id][l[id]++];
        tmp = ti * q;
        if ((ti + 1) % t == 0) {
            if (flag) putchar(' ');
            else flag = 1;
            printf("%d", now + tmp);
        }
        le = (ll)(now + tmp) * u / v, ri = (now + tmp) - le;
        le -= tmp, ri -= tmp;
        s[1][r[1]++] = le - q;
        s[2][r[2]++] = ri - q;
    }
    putchar('\n');

    flag = 0;
    int zc = q * m;
    for (int i = 0, id, now; i < n + m; i++) {
        id = GetMax();
        now = s[id][l[id]++];
        if((i + 1) % t == 0) {
            if (flag) putchar(' ');
            else flag = 1;
            printf("%d", now + zc);
        }
    }
    putchar('\n');
}
